﻿<%@ Page Title="" Language="C#" MasterPageFile="~/rightContent.Master" AutoEventWireup="true"
    CodeBehind="feeTemplateDesign.aspx.cs" Inherits="WEB.template.feeTemplateDesign" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" runat="server">
    费用模板
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <table class="distance">
        <tr>
            <td>
                模板名称：<asp:TextBox ID="tbTemplateName" runat="server" MaxLength="20"></asp:TextBox>
            </td>
            <td>
                货物类别：
                <asp:DropDownList ID="ddlGoodsName" runat="server" AppendDataBoundItems="True">
                    <asp:ListItem Value="0">---请选择---</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                费用类型：
                <asp:DropDownList ID="ddlTypeID" runat="server">
                    <asp:ListItem Value="1">应收</asp:ListItem>
                    <asp:ListItem Value="2">应付</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbTID" runat="server" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="4">
                <asp:GridView ID="gvFeeTemplatedetail" runat="server" OnRowDataBound="gvFeeTemplatedetail_RowDataBound"
                    AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None"
                    BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical" Width="900px">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="序号" InsertVisible="False">
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" Width="5%" />
                            <ItemTemplate>
                                <%#Container.DataItemIndex+1%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="默认费用类别">
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlfeeTypeID" AppendDataBoundItems="True" runat="server" DataSource='<%#GetFeeType() %>'
                                    DataTextField="feeName" DataValueField="feeTypeNo" SelectedValue='<%# Eval("feeNo") %>'>
                                    <asp:ListItem Value="0">---请选择---</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="默认金额">
                            <ItemTemplate>
                                <asp:TextBox ID="tbfeeAmount" Style="text-align: right" Text='<%# Eval("feeAmount") %>'
                                    onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"
                                    runat="server" MaxLength="13"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="备注">
                            <ItemTemplate>
                                <asp:TextBox ID="tbremark" runat="server" Text='<%# Eval("remark") %>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                    <SortedAscendingCellStyle BackColor="#F8FAFA"></SortedAscendingCellStyle>
                    <SortedAscendingHeaderStyle BackColor="#246B61"></SortedAscendingHeaderStyle>
                    <SortedDescendingCellStyle BackColor="#D4DFE1"></SortedDescendingCellStyle>
                    <SortedDescendingHeaderStyle BackColor="#15524A"></SortedDescendingHeaderStyle>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="btnAddRow" runat="server" Text="添加一行" OnClick="btnAddRow_Click" CssClass="Submit_yellowbig" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="btnSave" runat="server" Text="保存模板" CssClass="Submit_yellowbig" OnClick="btnSave_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
